package com.springinaction.springidol;

public class Instrumentallist implements Performer{
	
	// 歌曲， 通过spring注入song的值
	private String song;
	public void setSong(String song) {
		this.song = song;
	}
	// 演奏家年龄， 通过spring注入age的值
	private int age;
	public void setAge(int age){
		this.age = age;
	}
	// 乐器， 通过spring注入
	private Instrument instrument;
	public void setInstrument(Instrument instrument){
		this.instrument = instrument;
	}

	
	@Override
	public void perform() throws PerformanceException {
		System.out.println("Playing " + song + ": ");
		System.out.println("Age is " + age + ".");
		instrument.play();
	}
	
	// 咆哮的唱一只歌；
	public String screamSong(){
		return this.song;
	}
	
	

}
